<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/_container :: htmlhead"></head>
<body>
<div class="col-sm-6  col-sm-offset-3">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>用户管理</h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content" style="border:none !important; ">
                            <div class="form-horizontal">

                                <input type="hidden" id="id" th:value="${user.id}"/>
								<input type="hidden" id="sexValue" th:value="${user.sex}"/>

                                <div class="row">
                                    <div class="col-sm-6 b-r">                                       
                                        <div class="form-group">
										    <label class="col-sm-3 control-label head-scu-label">头像</label>
										    <div class="col-sm-4">
										        <div id="${id}PreId">
										            <div>
										            	<img width="100px" height="100px" id="avatarPreId" th:if="${user.avatar==null}" th:src="@{/static/img/girl.gif}"/>
										            	<img width="100px" height="100px" id="avatarPreId" th:if="${user.avatar!=null}" th:src="${user.avatar}"/>
										            </div>
 
										        </div>
										    </div>
										    <div class="col-sm-2">
										        <div class="head-scu-btn upload-btn" id="avatarBtnId" onclick="UserInfoDlg.selectFile()">
										            <i class="fa fa-upload"></i>&nbsp; 
										        </div>
										    </div>
										    <input type="file" id="fileUploadBtn" style="display:none" accept="gif,jpg,jpeg,bmp,png" onchange="UserInfoDlg.uploadFile()"/>
										    <input type="hidden" id="avatar" th:value="${user.avatar}"/>
										</div>
										<div class="hr-line-dashed"></div>
                                    </div>
                                    <div class="col-sm-6 ">
										<div class="form-group">
										    <label class="col-sm-3 control-label">账户				    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <input class="form-control" id="userName" type="text" th:value="${user.userName}"/>
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="col-sm-3 control-label">姓名				    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <input class="form-control" id="name" type="text" th:value="${user.name}" />
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6 ">
										<div class="form-group">
										    <label class="col-sm-3 control-label">性别					    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <select class="form-control" id="sex">
										            <option value="1">男</option>
													<option value="2">女</option>
										        </select>					       
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="col-sm-3 control-label">出生日期				    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <input class="form-control" id="birthday" th:value="${user.birthday}" type="date" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/>
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6 ">
										<div class="form-group">
										    <label class="col-sm-3 control-label">角色					    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <select class="form-control" id="roleId">
										        	<option th:value="${user.roleId}" th:text="${user.roleName}"></option>				         
										        </select>					       
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="col-sm-3 control-label">部门					 
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <input class="form-control" id="citySel" readonly="readonly" onclick="UserInfoDlg.showDeptSelectTree(); return false;"
										        	style="background-color: #ffffff !important;" th:value="${user.deptName}"/>
										         <input class="form-control" type="hidden" id="deptId" th:value="${user.deptId}" />
										    </div>
										</div>
										 <div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="col-sm-3 control-label">邮箱				    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <input class="form-control" id="email" type="email" th:value="${user.email}"/>
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="col-sm-3 control-label">电话				    
										    	<span style="color: red">*</span>
										    </label>
										    <div class="col-sm-9">
										        <input class="form-control" id="phone" type="text" th:value="${user.phone}"/>
										    </div>
										</div>
										<div class="hr-line-dashed"></div>
									</div>
                                </div>
								<!-- 这是部门选择的下拉框 -->
								<div id="menuContent" class="menuContent"
									style="display: none; position: absolute; z-index: 200;">
									<ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
								</div>
								
                                <div class="row btn-group-m-t">
                                    <div class="col-sm-10">
                                        <button type="button" class="btn btn-info" id="ensure" onclick="UserInfoDlg.editSubmit()" >
										   <i class="fa fa-check"></i>&nbsp;提交
										</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/static/modular/system/user/user_info.js}"></script>
</body>
</html>
